<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>员工资料</title>
</head>
<body>
<style>
.input-information{
	height: 20px;
    width: 200px;
    border-radius: 2px;
    outline: none;
    border: solid 1px lightgray;
    font-size: 15px;
    color:gray;
}
.input-information:hover{
	border:solid 1px lightseagreen;
}
.shengpi{
		display: block;
    	color: #1AB394;
    	font-weight: 700;
	}
	.center-body{
		margin: 10px 0px;
	    min-height: 140px;
	    background-color: rgba(255,255,255,1);
	    box-sizing: border-box;
	    border-width: 1px;
	    border-style: solid;
	    border-color: rgba(229,230,231,1);
	    border-radius: 2px;
	    position: relative;
	    padding: 20px;
	}
	.center-shengpi{
		width: 60px;
	    height: 100px;
	    margin-right: 50px;
	    float: left;
	    position: relative;
	}
	.center-shengpi img{
		width: 60px;
    	height: 60px;
    	border-radius: 30px;
	}
	.text-center{
		width: 16px;
	    height: 16px;
	    text-align: center;
	    background-color: rgba(24,166,137,1);
	    position: absolute;
	    line-height: 20px;
	    right: 4px;
	    top: 45px;
	    border-radius: 50%;
	}
	.textsex{
		width: 16px;
	    height: 16px;
	    background-color: rgba(24,166,137,1);
	    position: absolute;
	    line-height: 20px;
	    right: 4px;
	    top: 65px;
	    border-radius: 50%;
	}
	.report-pic{
		padding-top: 10px;
	    font-size: 15px;
	    color: #666;
	}
	.pic{
		width: 80px;
	    height: 100px;
	    margin-right: 50px;
	    float: left;
	    position: relative;
	}
	.pic div{
		text-align: center;
	}
	.pic img{
		width: 80px;
	    height: 80px;
	    border-radius: 50%;
	    vertical-align: middle;
	}
</style>
	<div style="width:80%;margin:20px auto;box-shadow:1px 1px 1px lightgray;background:white;">
		<div class="information_top" style="height:200px;">
			<img alt="" src="static/easyui/themes/icons/tiaowen.png" style="width:100%;"/>
			<div style="height:130px;">
				<img alt="" src="static/easyui/themes/icons/tx.jpg" style="width:130px;height:130px;display:inline-blcck;float:left;">
				<div style="display:inline-block;float:left;">
					<div style="border-bottom:solid 1px #E0E0E0;width: calc(660px);">
						<span style="width: fit-content; display: inline-block;height: 25px;font-size: 18px;margin: 0px 5px;color:#333333;" abbr="${departureinformation[0]['Staff_id']}">${departureinformation[0]["Staff_name"]}</span>
						
					</div>
					<div style="height: 30px;line-height: 30px;font-size: 14px;">
						<span style="width: 80px; text-align: center;display: inline-block;">部门：</span>
						<span>${departureinformation[0]["depart_name"]==null?'--':''}${departureinformation[0]["depart_name"]}</span><span style="margin:0 5px;">|</span><span>${departureinformation[0]["position_name"]==null?'--':''}${departureinformation[0]["position_name"]}</span>
					</div>
					<div style="height: 30px;line-height: 30px;font-size: 14px;">
						<span style="width: 80px; text-align: center;display: inline-block;">入职日期：</span>
						<span>${departureinformation[0]["Dateentry"]==null?'--':''}${departureinformation[0]["Dateentry"]}</span>
					</div>
					<div style="height: 30px;line-height: 30px;font-size: 14px;">
						<span style="width: 80px; text-align: center;display: inline-block;">手机号码：</span>
						<span>${departureinformation[0]["Staff_phone"]==null?'--':''}${departureinformation[0]["Staff_phone"]}</span>
					</div>
				</div>
			</div>
		</div>
		<div style="padding:10px;"> 
			<h4 class="geren" style="font-weight:normal;font-size:16px;" abbr="${departureinformation[0]['Rank_id']}">办理离职申请</h4><hr>
		</div>
		<div style="padding:20px;">
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;"><span style="color:red">*</span>姓名：</label><input class="input-information" value="${departureinformation[0]['Staff_name']}" readonly="readonly" value="转正" style="border:none;"/>
				</div>
				<div style="display:inline-block;width:49%;">
					<label  style="width:36%;text-align:center;display:inline-block;font-size:15px;"><span style="color:red">*</span>申请日期：</label><input class="input-information shqiriqi" value="${departureinformation[0]['Rank_date']}" type="date" readonly="readonly" value="转正" style="border:none;"/>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;"><span style="color:red">*</span>离职原因：</label><input class="input-information lizhireason" value="${departureinformation[0]['Rank_Reason']}" readonly="readonly" value="转正" style="border:none;"/>
				</div>
				<div style="display:inline-block;width:49%;">
					<label  style="width:36%;text-align:center;display:inline-block;font-size:15px;">离职去向：</label><input class="input-information lizhiquxiang" value="${departureinformation[0]['rank_quxiang']==null?'无':''}" readonly="readonly" value="转正" style="border:none;"/>
				</div>
			</div>
			
			<div style="width:80%;margin:30px auto;"><!-- 一行 -->
				<div style="display:inline-block;width:49%;"><!-- 一列 -->
					<label style="width:36%;text-align:center;display:inline-block;font-size:15px;"><span style="color:red">*</span>薪资结算日期：</label>
					<input class="input-information salarydate" type="date" value="${departureinformation[0]['salarydate']}" readonly="readonly" value="转正" style="border:none;"/>
				</div>
				<div style="display:inline-block;width:49%;">
					<label  style="width:36%;text-align:center;display:inline-block;font-size:15px;"><span style="color:red">*</span>最后工作日期：</label>
					<input class="input-information endworkdate" type="date" value="${departureinformation[0]['endworkdate']}" readonly="readonly" value="转正" style="border:none;"/>
				</div>
			</div>
			
						<div class="center">
					<span class="shengpi">审批人</span>
					<div class="center-body">
						<div class="pic">
							<img src="static/easyui/themes/icons/notui.jpg"/>
							<div class="textsex"></div>
							<div class="report-pic" abbr="${manager[0].staff_id}" ssb="${sid}">${manager[0].Staff_name }</div>
						</div>
					</div>
				</div>
				<div style="height:90px;">
					<div style="font-size:15px;${departureinformation[0]['rank_shpiresult']==null?'display:none':''}">
					<span>审批结果：</span><span style="color:red;">${departureinformation[0]['rank_shpiresult']}</span>
					</div>
					<div style="font-size:15px;${departureinformation[0]['rank_bohui']==null?'display:none':''}">
					<span>驳回原因：</span><span style="color:red;">${departureinformation[0]['rank_bohui']}</span>
					</div>
				</div>
			<div style="width:100%;height:64px;background:white;margin:30px auto;text-align:center;line-height:40px;position:absolute;bottom:-30px;margin-left:-140px;${departureinformation[0]['rank_shpiresult']==null?'':'display:none'}">
				<input onClick="fanhui()" type="button" style="margin: 0 20px;padding: 4px 15px;font-size: 16px; background:white;border-radius: 3px;border: solid 1px lightgray;cursor: pointer;color: black;" value="返回"/>
				<input onClick="queding()" type="button" style="margin: 0 20px;padding: 4px 15px;font-size: 16px; background:rgb(25, 170, 141);border-radius: 3px;border: none;cursor: pointer;color: white;" value="确认离职"/>
				<input onClick="bohui()" type="button" style="margin: 0 20px;padding: 4px 15px;font-size: 16px; background:#d9534f!important;border-radius: 3px;border: none;cursor: pointer;color: white;" value="驳回"/>
			</div>
			<div style="width:100%;height:64px;background:white;margin:30px auto;text-align:center;line-height:40px;position:absolute;bottom:-30px;margin-left:-140px;${departureinformation[0]['rank_shpiresult']==null?'display:none':''}">
				<input onClick="fanhui()" type="button" style="margin: 0 20px;padding: 4px 15px;font-size: 16px;  background:#d9534f!important;border-radius: 3px;border: none;cursor: pointer;color: white;" value="返回"/>
			</div>
		</div>
		</div>
		
		<script type="text/javascript">
		function fanhui(){
			$("#content-admin").panel('open').panel('refresh','ljj-rank-approval');
		}
		function queding(){
			var geren=$(".geren").attr("abbr");//离职id
			
			$.ajax({
				url:"updatedeparture",
				type:"post",
				data:{"rank_id":geren,"pd":1},
				success:function(data){
					$("#content-admin").panel('open').panel('refresh','ljj-rank-approval');
				}
				
			});
			
		}
		function bohui(){
		var geren=$(".geren").attr("abbr");//离职id
		var con=prompt("驳回理由：","");
		if(con!=null){
			$.ajax({
				url:"updatedeparture",
				type:"post",
				data:{"rank_id":geren,"rank_bohui":con,"pd":2},
				success:function(data){
					$("#content-admin").panel('open').panel('refresh','ljj-rank-approval');
				}
				
			});	
		}
		}
		</script>
</body>
</html>